import 'package:flutter/material.dart';

import 'my_theme.dart';

class OptionsItemBase extends StatelessWidget {
  final void Function() handle;
  final Widget child;
  EdgeInsetsGeometry? padding;

  OptionsItemBase(
      {Key? key,
      required this.handle,
      required this.child,
      this.padding = const EdgeInsets.only(top: 18, bottom: 18)})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: () {
        handle();
      },
      child: Container(
        decoration: BoxDecoration(
            border: Border(bottom: BorderSide(color: MyTheme.borderColor2))),
        padding: padding,
        child: child,
      ),
    );
  }
}

class OptionsBase extends StatelessWidget {
  final List<Widget> children;

  const OptionsBase({Key? key, this.children = const []}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.white,
      child: Padding(
        padding: const EdgeInsets.only(left: 24, right: 24),
        child: Column(
          children: children,
        ),
      ),
    );
  }
}
